package com.example.huangyuchen.advance.training.camp.composition;

/**
 * @author YuChen Huang
 * @date 2022/3/5 14:36
 */
public interface CompositionAble {

    void setQty(Integer qty);

    default void createBaseFields(Composition composition) {
        composition.qty = 1;
    }


    static CompositionAble getInstance(int i) {
        if (i == 1) {
            return new CompositionClassQtyModifier2() {
                @Override
                public void setQty(Integer qty) {
                    super.test(null);
                }
            }
        }
    }
}
